package cv.cvs.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RestVo<T> {
    private String code;
    private String message;
    private T data;

    public static<T> RestVo success(String message,T data){

        return new RestVo("2000",message,data);
    }
    public static<T> RestVo erorr(String message){

        return new RestVo("5000",message,null);
    }
}
